﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ValueType.Core
{
    public class ArrayListCopy
    {
        public object[] obj = new object[0];
        public int Count
        {
            get
            {
                return obj.Length;
            }
        }
        private void Bigger()
        {
            object[] s = new object[Count + 1];
            for (int i = 0; i < Count; i++)
            {
                s[i] = obj[i];
            }
            obj = s;
        }
        public int Add(object item)
        {
            Bigger();
            this.obj[Count - 1] = item;
            return this.Count - 1;
        }

    }
}
